home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol C-14 / Vol C-14.iso / games / prototyp.swf / scripts / DefineSprite_15 / frame_2 / PlaceObject2_14_1 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2012-04-23  |  1KB  |  42 lines

  1. onClipEvent(enterFrame){
  2.    currentbytes = int(_root.getBytesLoaded() / 1000);
  3.    totalbytes = int(_root.getBytesTotal() / 1000);
  4.    percentbytes = int(currentbytes / totalbytes * 100);
  5.    if(_parent.txtstyle == "Kilobytes")
  6.    {
  7.       textbox2.text = "Loading " + currentbytes + " Kb of " + totalbytes + " Kb";
  8.       textbox2.setTextFormat(_parent.myformat);
  9.       bar._xscale = percentbytes;
  10.       if(percentbytes >= 100)
  11.       {
  12.          textbox2.text = "Loading Complete";
  13.          textbox2.setTextFormat(_parent.myformat);
  14.          _root.play();
  15.       }
  16.    }
  17.    if(_parent.txtstyle == "Percent")
  18.    {
  19.       textbox2.text = "Loading " + percentbytes + "% ";
  20.       textbox2.setTextFormat(_parent.myformat);
  21.       bar._xscale = percentbytes;
  22.       if(percentbytes >= 100)
  23.       {
  24.          textbox2.text = "Loading Complete";
  25.          textbox2.setTextFormat(_parent.myformat);
  26.          _root.play();
  27.       }
  28.    }
  29.    if(_parent.txtstyle == "Both")
  30.    {
  31.       textbox2.text = "Loading " + percentbytes + "% of " + totalbytes + " Kb";
  32.       textbox2.setTextFormat(_parent.myformat);
  33.       bar._xscale = percentbytes;
  34.       if(percentbytes >= 100)
  35.       {
  36.          textbox2.text = "Loading Complete";
  37.          textbox2.setTextFormat(_parent.myformat);
  38.          _root.play();
  39.       }
  40.    }
  41. }
  42.